 
<div class="mws-panel grid_8 mws-collapsible  stages">
  <div class="mws-panel-header">
     <span class="mws-i-24 i-table-1"><?php  echo __('Stage'); ?></span>
   <div class="mws-collapse-button mws-inset"><span></span></div>
 </div>
<div class="mws-panel-body" style="display: block; direction:rtl;">
  <div class="right_direction"> 
  <table class="mws-table">
      <tbody>
		<tr><td class="left_header"><?php echo __('Id'); ?></td>
		<td>
			<?php echo h($stage['Stage']['id']); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Name'); ?></td>
		<td>
			<?php echo h($stage['Stage']['name']); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Level'); ?></td>
		<td>
			<?php echo h($stage['Stage']['level']); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('User'); ?></td>
		<td>
			<?php echo $this->Html->link($stage['User']['id'], array('controller' => 'users', 'action' => 'view', $stage['User']['id'])); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Created'); ?></td>
		<td>
			<?php echo h($stage['Stage']['created']); ?>
			&nbsp;
		</td></tr>
		<tr><td class="left_header"><?php echo __('Modified'); ?></td>
		<td>
			<?php echo h($stage['Stage']['modified']); ?>
			&nbsp;
		</td></tr>
	</tbody>
	</table>
</div>
</div>

<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Stage'), array('action' => 'edit', $stage['Stage']['id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Stage'), array('action' => 'delete', $stage['Stage']['id']), null, __('Are you sure you want to delete # %s?', $stage['Stage']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Stages'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Stage'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Users'), array('controller' => 'users', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New User'), array('controller' => 'users', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Branches'), array('controller' => 'branches', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Branch'), array('controller' => 'branches', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Branches'); ?></h3>
	<?php if (!empty($stage['Branch'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Type'); ?></th>
		<th><?php echo __('Name'); ?></th>
		<th><?php echo __('Stage Id'); ?></th>
		<th><?php echo __('Branch Id'); ?></th>
		<th><?php echo __('Category Id'); ?></th>
		<th><?php echo __('Active'); ?></th>
		<th><?php echo __('Order'); ?></th>
		<th><?php echo __('User Id'); ?></th>
		<th><?php echo __('Created'); ?></th>
		<th><?php echo __('Modified'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($stage['Branch'] as $branch): ?>
		<tr>
			<td><?php echo $branch['id']; ?></td>
			<td><?php echo $branch['type']; ?></td>
			<td><?php echo $branch['name']; ?></td>
			<td><?php echo $branch['stage_id']; ?></td>
			<td><?php echo $branch['branch_id']; ?></td>
			<td><?php echo $branch['category_id']; ?></td>
			<td><?php echo $branch['active']; ?></td>
			<td><?php echo $branch['order']; ?></td>
			<td><?php echo $branch['user_id']; ?></td>
			<td><?php echo $branch['created']; ?></td>
			<td><?php echo $branch['modified']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'branches', 'action' => 'view', $branch['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'branches', 'action' => 'edit', $branch['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'branches', 'action' => 'delete', $branch['id']), null, __('Are you sure you want to delete # %s?', $branch['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Branch'), array('controller' => 'branches', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
